<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/11/25
 * Time: 10:08
 */
echo 'Math函数';
$i=-23;
echo abs($i);
echo "<br />";
$i=5.367;
echo ceil($i);
echo "<br />";
$i=5.667;
echo floor($i);
echo "<br />";
$i=5.467;
echo round($i);
echo "<br />";
$arr=[1,32,4,5,6,3,1,3,24,6];
echo max($arr);
echo "<br />";
echo min($arr);
echo "<br />";
$num = rand(4.2,456);
echo $num;
echo "<br />";
echo '--------------------------------------------------------------------------';
echo "<br />";
echo 'date时间函数';
echo "<br />";
echo time();
echo "<br />";
echo date('Y年m月d日 H:i:s');
echo "<br />";
echo strtotime('12:12:34');
echo "<br />";
echo '---------------------------------------------------------------------------------';
echo "<br />";
echo ' 杂项函数';
echo "<br />";
 define('APP_PATH','asfew');
echo APP_PATH;

echo "<br />";
if (!defined('asfe')){
    define('asfe','afdfee');
}
echo asfe;
echo "<br />";
//die;
echo "echo 'eefege'";
echo "<br />";
echo eval("echo 'eefeg';");
echo "<br />";
//exit('退出程序');
echo "<br />";

echo time();
echo "<br />";
sleep(3);
echo time();
echo "<br />";
echo '--------------------------------------------------------------------------------';
echo "<br />";
$i='sfweuigoejaijeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee';
function getdoction(){
    echo $GLOBALS['i'];
}

getdoction();
echo "<br />";
echo $GLOBALS['arr'];
echo "<br />";
echo '--------------------------------------------------------------------------------';
//print_r($_SERVER);
echo "<br />";
echo '用户IP'. $_SERVER['SERVER_ADDR'];
echo "<br />";
echo '请求方法'.$_SERVER['REQUEST_METHOD'];
echo "<br />";
echo '请求路径'.$_SERVER['DOCUMENT_URI'];
echo "<br />";
echo '--------------------------------------------------------------------------------';
echo "<br />";


